package com.cdks.wuxiu.api.service.mysql;

import java.util.List;
import java.util.Set;

import com.baomidou.mybatisplus.extension.service.IService;
import com.cdks.wuxiu.api.model.dto.UserAnswerStatisDTO;
import com.cdks.wuxiu.api.model.dto.UserInfoDTO;
import com.cdks.wuxiu.api.model.dto.UserListDTO;
import com.cdks.wuxiu.entity.mysql.UserBaseInfo;


/**
 * 用户基本信息表 服务类
 */
public interface UserBaseInfoService extends IService<UserBaseInfo> {
    UserInfoDTO getInfoByIdWithStatis(long userId);
    UserInfoDTO getInfoByIdWithBalance(long userId, long expire);
    UserInfoDTO getInfoByIdWithFocus(long userId, long fansId);
    
    UserBaseInfo getInfoById(long userId);
    UserBaseInfo getInfoByPhone(String phone);
    UserBaseInfo getInviterInfo(long userId);
    
    List<UserListDTO> getList(long self, int sex, int role, int userType, int type, int page);
    List<UserBaseInfo> getKefuList();
    List<UserBaseInfo> getRandCallList(long selfId, int sex);

    int autoInviter(UserBaseInfo userInfo, long inviter);
    int bindInviter(UserBaseInfo userInfo, long inviter);
    int updateInviter(UserBaseInfo userInfo, long inviter);
    int setInviteStatus(UserBaseInfo userInfo, int status);
    int deleteUserInfo(UserBaseInfo userInfo);
    int updateListenerInfo(UserBaseInfo userInfo, UserAnswerStatisDTO statis);
    int updateStatus(long userId, int status);
    int updateOnlineStatus(long userId, int status);
    int updateOnlineStatus(long userId, int oldStatus, int newStatus);
    int updateOnlineStatus(Set<String> ids, int oldStatus, int newStatus);
    int cancelAuth(long userId);
}
